YES 1.157 H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:



HASKELL
  ↳ BR

mainModule List
  ((nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]) :: (a  ->  a  ->  Bool ->  [a ->  [a])

module List where
  import qualified Maybe
import qualified Prelude

  elem_by :: (a  ->  a  ->  Bool ->  a  ->  [a ->  Bool
elem_by _ _ [] False
elem_by eq y (x : xsx `eq` y || elem_by eq y xs

  nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]
nubBy eq l 
nubBy' l [] where 
nubBy' [] _ []
nubBy' (y : ysxs 
 | elem_by eq y xs = 
nubBy' ys xs
 | otherwise = 
y : nubBy' ys (y : xs)


module Maybe where
  import qualified List
import qualified Prelude



Replaced joker patterns by fresh variables and removed binding patterns.

↳ HASKELL
  ↳ BR
HASKELL
      ↳ COR

mainModule List
  ((nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]) :: (a  ->  a  ->  Bool ->  [a ->  [a])

module List where
  import qualified Maybe
import qualified Prelude

  elem_by :: (a  ->  a  ->  Bool ->  a  ->  [a ->  Bool
elem_by vx vy [] False
elem_by eq y (x : xsx `eq` y || elem_by eq y xs

  nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]
nubBy eq l 
nubBy' l [] where 
nubBy' [] vw []
nubBy' (y : ysxs 
 | elem_by eq y xs = 
nubBy' ys xs
 | otherwise = 
y : nubBy' ys (y : xs)


module Maybe where
  import qualified List
import qualified Prelude



Cond Reductions:
The following Function with conditions
nubBy' [] vw = []
nubBy' (y : ysxs
 | elem_by eq y xs
 = nubBy' ys xs
 | otherwise
 = y : nubBy' ys (y : xs)

is transformed to
nubBy' [] vw = nubBy'3 [] vw
nubBy' (y : ysxs = nubBy'2 (y : ysxs

nubBy'1 y ys xs True = nubBy' ys xs
nubBy'1 y ys xs False = nubBy'0 y ys xs otherwise

nubBy'0 y ys xs True = y : nubBy' ys (y : xs)

nubBy'2 (y : ysxs = nubBy'1 y ys xs (elem_by eq y xs)

nubBy'3 [] vw = []
nubBy'3 wx wy = nubBy'2 wx wy

The following Function with conditions
undefined 
 | False
 = undefined

is transformed to
undefined  = undefined1

undefined0 True = undefined

undefined1  = undefined0 False



↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
HASKELL
          ↳ LetRed

mainModule List
  ((nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]) :: (a  ->  a  ->  Bool ->  [a ->  [a])

module List where
  import qualified Maybe
import qualified Prelude

  elem_by :: (a  ->  a  ->  Bool ->  a  ->  [a ->  Bool
elem_by vx vy [] False
elem_by eq y (x : xsx `eq` y || elem_by eq y xs

  nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]
nubBy eq l 
nubBy' l [] where 
nubBy' [] vw nubBy'3 [] vw
nubBy' (y : ysxs nubBy'2 (y : ys) xs
nubBy'0 y ys xs True y : nubBy' ys (y : xs)
nubBy'1 y ys xs True nubBy' ys xs
nubBy'1 y ys xs False nubBy'0 y ys xs otherwise
nubBy'2 (y : ysxs nubBy'1 y ys xs (elem_by eq y xs)
nubBy'3 [] vw []
nubBy'3 wx wy nubBy'2 wx wy


module Maybe where
  import qualified List
import qualified Prelude



Let/Where Reductions:
The bindings of the following Let/Where expression
nubBy' l []
where 
nubBy' [] vw = nubBy'3 [] vw
nubBy' (y : ysxs = nubBy'2 (y : ysxs
nubBy'0 y ys xs True = y : nubBy' ys (y : xs)
nubBy'1 y ys xs True = nubBy' ys xs
nubBy'1 y ys xs False = nubBy'0 y ys xs otherwise
nubBy'2 (y : ysxs = nubBy'1 y ys xs (elem_by eq y xs)
nubBy'3 [] vw = []
nubBy'3 wx wy = nubBy'2 wx wy

are unpacked to the following functions on top level
nubByNubBy'2 wz (y : ysxs = nubByNubBy'1 wz y ys xs (elem_by wz y xs)

nubByNubBy'1 wz y ys xs True = nubByNubBy' wz ys xs
nubByNubBy'1 wz y ys xs False = nubByNubBy'0 wz y ys xs otherwise

nubByNubBy'3 wz [] vw = []
nubByNubBy'3 wz wx wy = nubByNubBy'2 wz wx wy

nubByNubBy' wz [] vw = nubByNubBy'3 wz [] vw
nubByNubBy' wz (y : ysxs = nubByNubBy'2 wz (y : ysxs

nubByNubBy'0 wz y ys xs True = y : nubByNubBy' wz ys (y : xs)



↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
        ↳ HASKELL
          ↳ LetRed
HASKELL
              ↳ Narrow

mainModule List
  (nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a])

module List where
  import qualified Maybe
import qualified Prelude

  elem_by :: (a  ->  a  ->  Bool ->  a  ->  [a ->  Bool
elem_by vx vy [] False
elem_by eq y (x : xsx `eq` y || elem_by eq y xs

  nubBy :: (a  ->  a  ->  Bool ->  [a ->  [a]
nubBy eq l nubByNubBy' eq l []

  
nubByNubBy' wz [] vw nubByNubBy'3 wz [] vw
nubByNubBy' wz (y : ysxs nubByNubBy'2 wz (y : ys) xs

  
nubByNubBy'0 wz y ys xs True y : nubByNubBy' wz ys (y : xs)

  
nubByNubBy'1 wz y ys xs True nubByNubBy' wz ys xs
nubByNubBy'1 wz y ys xs False nubByNubBy'0 wz y ys xs otherwise

  
nubByNubBy'2 wz (y : ysxs nubByNubBy'1 wz y ys xs (elem_by wz y xs)

  
nubByNubBy'3 wz [] vw []
nubByNubBy'3 wz wx wy nubByNubBy'2 wz wx wy


module Maybe where
  import qualified List
import qualified Prelude



Haskell To QDPs


↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
        ↳ HASKELL
          ↳ LetRed
            ↳ HASKELL
              ↳ Narrow
QDP
                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

new_nubByNubBy'(xu32, :(xu340, xu341), xu35, xu36, ba) → new_nubByNubBy'1(xu32, xu340, xu341, xu35, xu36, :(xu35, xu36), ba)
new_nubByNubBy'1(xu32, xu33, xu34, xu35, xu36, :(xu380, xu381), ba) → new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, xu381, ba)
new_nubByNubBy'10(xu32, xu33, :(xu340, xu341), xu35, xu36, xu38, ba) → new_nubByNubBy'1(xu32, xu340, xu341, xu35, xu36, :(xu35, xu36), ba)
new_nubByNubBy'1(xu32, xu33, xu34, xu35, xu36, [], ba) → new_nubByNubBy'(xu32, xu34, xu33, :(xu35, xu36), ba)
new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, :(xu380, xu381), ba) → new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, xu381, ba)
new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, [], ba) → new_nubByNubBy'(xu32, xu34, xu33, :(xu35, xu36), ba)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
        ↳ HASKELL
          ↳ LetRed
            ↳ HASKELL
              ↳ Narrow
                ↳ QDP
                  ↳ DependencyGraphProof
QDP
                      ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

new_nubByNubBy'(xu32, :(xu340, xu341), xu35, xu36, ba) → new_nubByNubBy'1(xu32, xu340, xu341, xu35, xu36, :(xu35, xu36), ba)
new_nubByNubBy'1(xu32, xu33, xu34, xu35, xu36, :(xu380, xu381), ba) → new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, xu381, ba)
new_nubByNubBy'10(xu32, xu33, :(xu340, xu341), xu35, xu36, xu38, ba) → new_nubByNubBy'1(xu32, xu340, xu341, xu35, xu36, :(xu35, xu36), ba)
new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, :(xu380, xu381), ba) → new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, xu381, ba)
new_nubByNubBy'10(xu32, xu33, xu34, xu35, xu36, [], ba) → new_nubByNubBy'(xu32, xu34, xu33, :(xu35, xu36), ba)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: